import axios from '../utils/axios';
import {api} from '@/config/api'


//登录
export const loginApi = (data?:any)=>{
  return axios.post(api.login,data)
}

// 刷新token
export const refreshTokenApi = (data?:any)=>{
  return axios.post(api.refreshToken,data)
}

//获取验证码图片
export const captchaApi = (data?:any)=>{
  return axios.get(api.captcha)
}

//创建用户
export const createUserApi = (data?:any)=>{
  return axios.post(api.createUser,data)
}

// 获取用户列表
export const getUsersApi = (data?:any)=>{
  return axios.post(api.getUsers,data)
}

// 修改用户状态
export const changeStatusApi = (data?:any)=>{
  return axios.post(api.changeStatusUser,data)
}

// 编辑用户
export const updateUserApi = (data?:any)=>{
  return axios.post(api.updateUser,data)
}
// 删除用户
export const deleteUsersApi = (data?:any)=>{
  return axios.post(api.deleteUsers,data)
}
